package com.power.using.mydaggerp.model.detail;

import android.support.annotation.NonNull;

import com.power.using.mydaggerp.api.WangyiApi;
import com.power.using.mydaggerp.base.BaseModel;
import com.power.using.mydaggerp.contract.detail.WangyiDetailContract;
import com.zyw.horrarndoo.sdk.helper.RetrofitCreateHelper;
import com.zyw.horrarndoo.sdk.helper.RxHelper;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by 聪明一只哈 on 2019/10/12.
 * Time: 2019/10/12  13:38
 */
public class WangyiDetailModel extends BaseModel implements WangyiDetailContract.IWangyiDetailModel{


    @NonNull
    public static WangyiDetailModel newInstance() {
        return new WangyiDetailModel();
    }



    @Override
    public Observable<ResponseBody> getNewsDetail(String id) {
        return RetrofitCreateHelper.createApi(WangyiApi.class,WangyiApi.HOST).getNewsDetail(id)
                .compose(RxHelper.<ResponseBody>rxSchedulerHelper());
    }
}
